#include<iostream>
#include<stdio.h>
#include<conio.h>
using namespace std;
class Nguoi
{
public:
	virtual void Chao();
};
void Nguoi::Chao()
{
	cout<<"toi chua bit chao";
};
 class NguoiViet:public Nguoi
 {
 public:
	 void Chao();
 };
 void NguoiViet::Chao()
 {
	 cout<<"xin chao"<<endl;
 }
 class NguoiAnh:public Nguoi
 {
 public:
	 void Chao()
	 {
		 cout<<"Hello";
	 }
 };
 int main()
 {
	 Nguoi *n;
	 NguoiViet nv;
	 NguoiAnh na;
	 n=&nv;
	 n->Chao();
	 n=&na;
	 n->Chao();
	 getch();
	 return 0;
 }